﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
using FrameBuilderLib;
using System.Xml.Serialization;
using System.Xml;

namespace FrameBuilder
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void btn_OK_Click(object sender, EventArgs e)
        {
            string path = @"C:\Documents and Settings\dasha\Рабочий стол\Поиск Сайтов\SiteSearch1\SiteSearch\ВЕДОМОСТИ - От редакции Валютная эпидемия.htm";
            string path1 = @"..\..\site_xml.xml";
            string text=File.ReadAllText(path,Encoding.Default);
            List<string> content=text.Split('\n','\r').ToList<string>();
            content=(from c in content where c!="" select c).ToList<string>();
            //HTML site = new HTML(content);
            //MessageBox.Show(site.Find(tb_word.Text).ToString());
            
            /*XmlSerializer serializer = new XmlSerializer(typeof(HTML));
            Stream fs = new FileStream(path1, FileMode.Create);
            XmlWriter writer =
            new XmlTextWriter(fs, Encoding.Default);
            // Serialize using the XmlTextWriter.
            serializer.Serialize(writer, site);
            writer.Close();*/
            richTextBox1.Text = File.ReadAllText(path1, Encoding.Default);
        }

        private void Form1_Load(object sender, EventArgs e)
        {

        }
    }
}
